#!/bin/sh

set -e

if [ "$1" = "remove" ] || [ "$1" = "upgrade"] ; then
    if [ -e /etc/gdm/PostSession/Default ] ; then
        sed -e "/^# Start-AutoFsck/,/^# End-AutoFsck/d" -i /etc/gdm/PostSession/Default
    fi
    if [ -e /etc/kde3/kdm/Xreset ] ; then
        sed -e "/^# Start-AutoFsck/,/^# End-AutoFsck/d" -i /etc/kde3/kdm/Xreset
    fi
    rm /etc/rc0.d/S85autofsck
fi

exit 0
